package com.bole.service.impl;

import com.bole.dao.CarDao;
import com.bole.pojo.CollectionsDo;
import com.bole.pojo.TbCarDo;
import com.bole.service.CarService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@Service
public class CarServiceImpl implements CarService {

    @Resource
    private CarDao carDao;

    @Override
    public List<TbCarDo> findCarByCarId(List<CollectionsDo> collection) {
        List<TbCarDo> list = new ArrayList<>();
        for (CollectionsDo collectionsDo : collection) {
            TbCarDo carById = carDao.findCarById(collectionsDo.getCarId());
            list.add(carById);
        }
        return list;
    }
    @Override
    public void findAllByCarId(Long carId) {

    }
}
